package com.mall.service;

import com.mall.common.model.GlobalResponse;
import com.mall.form.CartAddForm;
import com.mall.form.CartUpdateForm;
import com.mall.pojo.Cart;
import com.mall.vo.CartVO;

import java.util.List;

/**
 * @Classname ICartService
 * @Description
 * @Date 2022/7/30 20:13
 * @Created by TaoVh
 */
public interface ICartService {
    GlobalResponse<CartVO> add(Integer uid,CartAddForm addForm);

    GlobalResponse<CartVO> list(Integer uid);

    /*更新购物车*/
    GlobalResponse<CartVO> update(Integer uid, Integer productId, CartUpdateForm cartUpdateForm);

    GlobalResponse<CartVO> delete(Integer uid, Integer productId);

    GlobalResponse<CartVO> selectAll(Integer uid);

    GlobalResponse<CartVO> unselectAll(Integer uid);

    GlobalResponse<Integer> sum(Integer uid);

    List<Cart> listForCart(Integer uid);

}
